a11y: Fix refcounting for treeview cells
authorBenjamin Otte <otte@redhat.com>
Wed, 26 Feb 2014 01:29:36 +0000 (02:29 +0100)
committerBenjamin Otte <otte@redhat.com>
Wed, 26 Feb 2014 01:36:08 +0000 (02:36 +0100)
commitaf4b26f5812b990a7f4af725d9b3a09e7c4ac63a
tree5cef3ad22890af8f63f76afbb87d8a03d9b0260b
parentbcdb4aa2a789303652a8a8cf23e2ccc1978c7374
a11y: Fix refcounting for treeview cells

Old code assumed that AT-SPI would keep track of references and
therefore tried to only hold weak references. On the other hand it also
tried to keep objects alive so it referenced objects very randomly. All
of that lead to cycles and leaking.

As AT-SPI does not keep track of objects at all, the treeview now does.
The refcounting looks as follows:
GtkTreeViewAccessible
  => creates per row/column
GtkTreeViewAccessibleCellInfo
  => which references 1
GtkCellAccessible

If there is only one cell, this accessible is a
GtkRendererCellAccessible, otherwise a GtkContainerCellAccessible is
created and that accessible holds references to the
GtkRendererCellAccessibles that are created for every cell renderer.

https://bugzilla.gnome.org/show_bug.cgi?id=554618
gtk/a11y/gtkcellaccessible.c
gtk/a11y/gtkcontainercellaccessible.c
gtk/a11y/gtktreeviewaccessible.c